﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Media;

namespace HFUTCourseSimulation.Util {

    /// <summary>
    /// 用于在Simulator和Render之间确保采用的色彩的一致性
    /// </summary>
    public static class ColorConsistency {

        /// <summary>
        /// UI界面的背景色（白天或夜晚（然而没有实现，现在全是白天模式））
        /// </summary>
        public static ColorPair Backboard => new ColorPair(Colors.Black, Colors.White);
        //public static ColorPair Backboard = new ColorPair(Colors.White, Colors.Black);

        /// <summary>
        /// 获取标题栏的配色（星期几和日期）
        /// </summary>
        public static ColorPair HeadbarColor => ColorPreset.MdColors.Grey;

        /// <summary>
        /// 获取侧边栏的配色（节次号）
        /// </summary>
        /// <param name="kind"></param>
        /// <returns></returns>
        public static ColorPair GetSidebarColor(Kernel.Data.Presentation.IndexKind kind) {
            switch (kind) {
                case Kernel.Data.Presentation.IndexKind.Dawn:
                    return ColorPreset.MdColors.Cyan;
                case Kernel.Data.Presentation.IndexKind.Morning:
                    return ColorPreset.MdColors.LightBlue;
                case Kernel.Data.Presentation.IndexKind.Afternoon:
                    return ColorPreset.MdColors.Amber;
                case Kernel.Data.Presentation.IndexKind.Night:
                    return ColorPreset.MdColors.BlueGrey;
                default:
                    return ColorPreset.MdColors.Grey;
            }
        }

        /// <summary>
        /// 棋盘中的异色颜色的配置
        /// </summary>
        public static Color ChessboardColor => Color.FromArgb(20, 127, 127, 127);


        public static ColorPair InfoColor => new ColorPair(Colors.Black, Colors.White);
        public static ColorPair WarningColor => ColorPreset.MdColors.Amber;
        public static ColorPair ErrorColor => ColorPreset.MdColors.Red;

    }

}
